﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Sbook
{
    public partial class Search : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                string chuoi = "";
                string search = Request.QueryString["t"];
                chuoi += " PName like N'%" + search + "%'  OR Pauthor like N'%" + search + "%'";
                rptProducts.DataSource = Business.ProductsService.Products_GetByTop("1000", chuoi, "PId desc");
                rptProducts.DataBind();
            }
        }
    }
}